package com.lei.springbootpractice.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value="conversation")
public class ConversationPojo {
    @TableId(value = "conversation_id", type = IdType.ASSIGN_ID)
    @TableField(value = "conversation_id")
    private String conversationId;
    
    @TableField(value = "customer_id")
    private String customerId;
    
    @TableField(value = "customer_service_id")
    private String customerServiceId;
    
    @TableField(value = "status")
    private String status;
    
    @TableField(value = "created_time")
    private String createdTime;
    
    @TableField(value = "last_message_time")
    private String lastMessageTime;
    
    @TableField(value = "customer_unread_count")
    private int customerUnreadCount = 0;
    
    @TableField(value = "service_unread_count")
    private int serviceUnreadCount = 0;
    
    // 非数据库字段，用于显示
    @TableField(exist = false)
    private String customerName;
    
    @TableField(exist = false)
    private String customerServiceName;
    
    @TableField(exist = false)
    private String lastMessage;
    
    @TableField(exist = false)
    private int messageCount;

    // 手动添加getter和setter方法确保兼容性
    public String getConversationId() {
        return conversationId;
    }

    public void setConversationId(String conversationId) {
        this.conversationId = conversationId;
    }

    public String getCustomerId() {
        return customerId;
    }

    public void setCustomerId(String customerId) {
        this.customerId = customerId;
    }

    public String getCustomerServiceId() {
        return customerServiceId;
    }

    public void setCustomerServiceId(String customerServiceId) {
        this.customerServiceId = customerServiceId;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(String createdTime) {
        this.createdTime = createdTime;
    }

    public String getLastMessageTime() {
        return lastMessageTime;
    }

    public void setLastMessageTime(String lastMessageTime) {
        this.lastMessageTime = lastMessageTime;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public String getCustomerServiceName() {
        return customerServiceName;
    }

    public void setCustomerServiceName(String customerServiceName) {
        this.customerServiceName = customerServiceName;
    }

    public String getLastMessage() {
        return lastMessage;
    }

    public void setLastMessage(String lastMessage) {
        this.lastMessage = lastMessage;
    }

    public int getMessageCount() {
        return messageCount;
    }

    public void setMessageCount(int messageCount) {
        this.messageCount = messageCount;
    }

    public int getCustomerUnreadCount() {
        return customerUnreadCount;
    }

    public void setCustomerUnreadCount(int customerUnreadCount) {
        this.customerUnreadCount = customerUnreadCount;
    }

    public int getServiceUnreadCount() {
        return serviceUnreadCount;
    }

    public void setServiceUnreadCount(int serviceUnreadCount) {
        this.serviceUnreadCount = serviceUnreadCount;
    }
} 